package com.rybbaby.tss.front.tssFeedback.entity;

import com.rybbaby.tss.front.tssClassRoom.entity.TssClassRoom;
import com.rybbaby.tss.platform.sysAdminUser.entity.SysAdminUser;
import com.rybbaby.tss.platform.sysSchool.entity.SysSchool;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.io.Serializable;
import java.sql.Timestamp;

/**
 * @description 反馈意见
 * 
 * @author 雷春琼
 * 
 * @createDate 2017-08-09 下午11:56:55
 */
@Entity
@Table(name = "tss_feedback")
@DynamicUpdate(true)
@DynamicInsert(true)
public class TssFeedback implements Serializable {


    private static final long serialVersionUID = 7830201538752558688L;
    /** 主键 **/
	private String id;
    /** 园所Id **/
	private String schoolId;
    /** 标题 **/
	private String title;
    /** 反馈内容 **/
    private String content;
    /** 处理内容 **/
    private String processingContent;
    /** 联系方式 **/
    private Integer phone;
    /** 处理状态 **/
    private Integer status;
    /**反馈来源**/
    private Integer source;
    /** 创建时间 **/
    private java.sql.Timestamp createTime;
    /** 更新时间 **/
    private java.sql.Timestamp updateTIme;
    /** 创建人 **/
    private String createUserId;
    /** 更新人 **/
    private String updateUserId;



    /**
     * 管理员
     */
    private SysSchool sysSchool;
    /**
     * 管理员
     */
    private SysAdminUser createUser;

    /**
     * 管理员
     */
    private SysAdminUser updateUser;



    /**
	 * 方法: 取得主键
	 *
	 * @return java.lang.String 主键
	 */
	@Id
	@GeneratedValue(generator = "tss_feedbackIDGenerator" , strategy = GenerationType.AUTO)
	@GenericGenerator(name = "tss_feedbackIDGenerator" , strategy = "uuid")
	@Column(name = "id", nullable= false, length = 32)
	public String getId() {
		return this.id;
	}

	/**
	 * 方法: 设置主键
	 *
	 * @param id 主键
	 */
	public void setId(String id) {
		this.id = id;
	}

    @Column(name = "schoolId", nullable= true, length = 32)
    public String getSchoolId() {
        return schoolId;
    }

    public void setSchoolId(String schoolId) {
        this.schoolId = schoolId;
    }

    @Column(name = "title", nullable= true, length = 255)
    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    @Column(name = "content", nullable= true, length = 255)
    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    @Column(name = "processingContent", nullable= true, length = 255)
    public String getProcessingContent() {
        return processingContent;
    }

    public void setProcessingContent(String processingContent) {
        this.processingContent = processingContent;
    }

    @Column(name = "phone", nullable= true, length = 11)
    public Integer getPhone() {
        return phone;
    }

    public void setPhone(Integer phone) {
        this.phone = phone;
    }

    @Column(name = "status", nullable= true, length = 11)
    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    @Column(name = "createTime", nullable= true, length = 32)
    public Timestamp getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }

    @Column(name = "updateTIme", nullable= true, length = 32)
    public Timestamp getUpdateTIme() {
        return updateTIme;
    }

    public void setUpdateTIme(Timestamp updateTIme) {
        this.updateTIme = updateTIme;
    }

    @Column(name = "createUserId", nullable= true, length = 32)
    public String getCreateUserId() {
        return createUserId;
    }

    public void setCreateUserId(String createUserId) {
        this.createUserId = createUserId;
    }

    @Column(name = "updateUserId", nullable= true, length = 32)
    public String getUpdateUserId() {
        return updateUserId;
    }

    public void setUpdateUserId(String updateUserId) {
        this.updateUserId = updateUserId;
    }

    @JoinColumn(name = "schoolId" , insertable = false , updatable = false)
    @ManyToOne(fetch = FetchType.LAZY , targetEntity = SysSchool.class)
    public SysSchool getSysSchool() {
        return sysSchool;
    }

    public void setSysSchool(SysSchool sysSchool) {
        this.sysSchool = sysSchool;
    }

    @JoinColumn(name = "createUserId" , insertable = false , updatable = false)
    @ManyToOne(fetch = FetchType.LAZY , targetEntity = SysAdminUser.class)
    public SysAdminUser getCreateUser() {
        return createUser;
    }

    public void setCreateUser(SysAdminUser createUser) {
        this.createUser = createUser;
    }

    @JoinColumn(name = "updateUserId" , insertable = false , updatable = false)
    @ManyToOne(fetch = FetchType.LAZY , targetEntity = SysAdminUser.class)
    public SysAdminUser getUpdateUser() {
        return updateUser;
    }

    public void setUpdateUser(SysAdminUser updateUser) {
        this.updateUser = updateUser;
    }

    @Column(name = "source", nullable= true, length = 11)
    public Integer getSource() {
        return source;
    }

    public void setSource(Integer source) {
        this.source = source;
    }
}